package com.mszlu.blog.controller;

import com.mszlu.blog.service.LoginService;
import com.mszlu.blog.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package: com.mszlu.blog.controller
 * @ClassName: LogoutController
 * @Author: 陈威
 * @CreateTime: 2021/8/31 11:21
 * @Description: 退出登录
 */
@RestController
@RequestMapping("logout")
public class LogoutController {

    @Autowired
    private LoginService loginService;

    @GetMapping
    public Result logOut(@RequestHeader("Authorization") String token) {
        return loginService.logout(token);

    }

}